import { ref } from 'vue'

export function fileDirSelect() {
  const selectedPath = ref(null)

  function browseFolder() {
    window.api.folder.openFolderDialog()
  }

  window.electron.ipcRenderer.on('open-dir-confirm', (events, resp) => {
    selectedPath.value = resp
  })
  return { browseFolder, selectedPath }
}
